package com.example.PriceCompare;

import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
import android.util.Log;

public class MyLocationListen implements LocationListener{

	private double fromPointLat, fromPointLong;
	
	@Override
	public void onLocationChanged(Location loc){
//	loc.getLatitude();
//	loc.getLongitude();
	fromPointLat = loc.getLatitude();
	fromPointLong = loc.getLongitude();
	Log.d("test",Double.toString(fromPointLat)+"check");

//	String Text = "My current location is: Latitud = "+loc.getLatitude()+" Longitud = "+ loc.getLongitude();
//	Toast.makeText( getApplicationContext(),Text,Toast.LENGTH_SHORT).show();
	
	}

	@Override
	public void onProviderDisabled(String provider){
	}

	@Override
	public void onProviderEnabled(String provider){
		
	}

	@Override
	public void onStatusChanged(String provider, int status, Bundle extras)
	{

	}

	public double getCurLat()
	{
		Log.d("test","get lat called");
		return fromPointLat;
	}
	public double getCurLong()
	{
		Log.d("test","get long called");
		return fromPointLong;
	}
}
